package com.ccsu.joysport.repository;


import com.ccsu.joysport.entity.Activity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface ActivityRepository extends JpaRepository<Activity, String> {
    List<Activity> findByClubId(String clubId);
    List<Activity> findByActivityNameContainingIgnoreCase(String queryText);
    Optional<Activity> findByActivityIdAndClubId(String activityId, String clubId);
    Optional<Activity> findByActivityId(String activityId);
    Page<Activity> findByActivityNameLike(String searchText, PageRequest pageRequest);
    List<Activity> findByClubIdInAndActivityNameLikeAndActivityStatusEquals(List<String> clubIds, String searchText, String activityStatus, PageRequest pageRequest);
}
